home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / turbovis / tvtoys04.zip / STRMREC.PAS < prev    next >
Pascal/Delphi Source File  |  1993-12-15  |  4KB  |  148 lines

  1. (***************************************************************************
  2.   Stream registration unit
  3.   PJB December 15, 1993, Internet mail to d91-pbr@nada.kth.se
  4.   Copyright PJB 1993, All Rights Reserved.
  5.   Free source, use at your own risk.
  6.   If modified, please state so if you pass this around.
  7.  
  8.   All stream registration in one unit
  9.  
  10. ***************************************************************************)
  11. unit StrmRec;
  12.  
  13. interface
  14.  
  15.   uses
  16.     Objects,
  17.     toyPrefs,
  18.     ColorBox, ColorTxt, FontDlg, FontFiles, ModeDlg, TVPal, TVUtils;
  19.  
  20.  
  21.   procedure RegisterAllToys;
  22.   procedure RegisterColoredText;
  23.   procedure RegisterFontFile;
  24.  
  25.  
  26. (***************************************************************************
  27. ***************************************************************************)
  28. implementation
  29.  
  30.  
  31.   const
  32.     RColoredText: TStreamRec = (
  33.        ObjType: toyColorTxtRN;
  34.        VmtLink: Ofs(TypeOf(TColoredText)^);
  35.        Load:    @TColoredText.Load;
  36.        Store:   @TColoredText.Store
  37.     );
  38.  
  39.   const
  40.     RColorDialog: TStreamRec = (
  41.        ObjType: 21;
  42.        VmtLink: Ofs(TypeOf(TColorBox)^);
  43.        Load:    @TColorBox.Load;
  44.        Store:   @TColorBox.Store
  45.     );
  46.  
  47.   const
  48.     RHexValidator: TStreamRec = (
  49.        ObjType: toyHexValidatorRN;
  50.        VmtLink: Ofs(TypeOf(THexValidator)^);
  51.        Load:    @THexValidator.Load;
  52.        Store:   @THexValidator.Store
  53.     );
  54.  
  55.   const
  56.     RFileValidator: TStreamRec = (
  57.        ObjType: toyFileValidatorRN;
  58.        VmtLink: Ofs(TypeOf(TFileValidator)^);
  59.        Load:    @TFileValidator.Load;
  60.        Store:   @TFileValidator.Store
  61.     );
  62.  
  63.   const
  64.     RFontFile: TStreamRec = (
  65.        ObjType: toyFontFileRN;
  66.        VmtLink: Ofs(TypeOf(TFontFile)^);
  67.        Load:    @TFontFile.Load;
  68.        Store:   @TFontFile.Store
  69.     );
  70.  
  71.   const
  72.     RPathValidator: TStreamRec = (
  73.        ObjType: toyPathValidatorRN;
  74.        VmtLink: Ofs(TypeOf(TPathValidator)^);
  75.        Load:    @TPathValidator.Load;
  76.        Store:   @TPathValidator.Store
  77.     );
  78.  
  79.   const
  80.     RRealValidator: TStreamRec = (
  81.        ObjType: toyRealValidatorRN;
  82.        VmtLink: Ofs(TypeOf(TRealValidator)^);
  83.        Load:    @TRealValidator.Load;
  84.        Store:   @TRealValidator.Store
  85.     );
  86.  
  87.   const
  88.     RSelectFontDialog: TStreamRec = (
  89.        ObjType: toySelectFontRN;
  90.        VmtLink: Ofs(TypeOf(TSelFontDialog)^);
  91.        Load:    @TSelFontDialog.Load;
  92.        Store:   @TSelFontDialog.Store
  93.     );
  94.  
  95.   const
  96.     RSelectVideoModeDialog: TStreamRec = (
  97.        ObjType: toySelectVideoModeRN;
  98.        VmtLink: Ofs(TypeOf(TSelectVideoModeDialog)^);
  99.        Load:    @TSelectVideoModeDialog.Load;
  100.        Store:   @TSelectVideoModeDialog.Store
  101.     );
  102.  
  103.   const
  104.     RSliderValidator: TStreamRec = (
  105.        ObjType: toySliderValidatorRN;
  106.        VmtLink: Ofs(TypeOf(TSliderValidator)^);
  107.        Load:    @TSliderValidator.Load;
  108.        Store:   @TSliderValidator.Store
  109.     );
  110.  
  111.   const
  112.     RVideoPaletteDialog : TStreamRec = (
  113.       ObjType : toyVideoPaletteRN;
  114.       VmtLink : Ofs(Typeof(TVideoPaletteDialog)^);
  115.       Load    : @TVideoPaletteDialog.Load;
  116.       Store   : @TVideoPaletteDialog.Store);
  117.  
  118.  
  119.     (*******************************************************************
  120.     *******************************************************************)
  121.  
  122.   procedure RegisterFontFile;
  123.   begin
  124.     RegisterType(RFontFile);
  125.   end;
  126.  
  127.   procedure RegisterColoredText;
  128.   begin
  129.     RegisterType(RColoredText);
  130.   end;
  131.  
  132.   procedure RegisterAllToys;
  133.   begin
  134.     RegisterType(RColorDialog);
  135.     RegisterType(RColoredText);
  136.     RegisterType(RFileValidator);
  137.     RegisterType(RFontFile);
  138.     RegisterType(RHexValidator);
  139.     RegisterType(RPathValidator);
  140.     RegisterType(RRealValidator);
  141.     RegisterType(RSelectFontDialog);
  142.     RegisterType(RSelectVideoModeDialog);
  143.     RegisterType(RSliderValidator);
  144.     RegisterType(RVideoPaletteDialog);
  145.   end;
  146.  
  147.  
  148. end.